﻿// <copyright file="MachineRegistryEntryAttributes.cs" company="Sinclair Community College">
// Copyright 2010 Sinclair Community College
// </copyright>
// <originalAuthor>Patrick S. Seymour (patrick.seymour@gmail.com)</originalAuthor>

namespace SinclairCC.AppV
{
    using System;

    /// <summary>
    /// The attributes that can be associated with a registry entry in the machine
    /// registry section (section 0x09) of a CP file.
    /// </summary>
    /// <remarks>
    /// These values can be used as bit fields.
    /// Any fields not listed are reserved and should be set to zero (0).
    /// </remarks>
    [Flags]
    public enum MachineRegistryEntryAttributes : int
    {
        /// <summary>
        /// This bit is set if the entry is of value type and there is value data present. If the bit is not set, registry value contains no value data. This bit needs to be observed when parsing virtual registry values.
        /// </summary>
        ValueDataPresent = 0x04,

        /// <summary>
        /// This bit is set if the entry is of key type and it must override local key of the same path completely. This bit controls the visibility (or lack of) of the local registry underneath the virtualized registry entry.
        /// </summary>
        OverrideLocalKey = 0x10,

        /// <summary>
        /// This bit is set if the entry is of key type and key in question has been deleted from registry and it needs to appear as deleted in virtual environment.
        /// </summary>
        DeletedKey = 0x20,

        /// <summary>
        /// This bit must always be set to 1.
        /// </summary>
        Reserved1 = 0x40,

        /// <summary>
        /// This might be set to 1.
        /// </summary>
        Reserved2 = 0x80
    }
}
